package com.module.antiFake.manager;

import java.util.List;

import org.hibernate.Session;

import base.dao.GenericHibernateDao;
import base.manager.GenericHibernateManager;

import com.module.antiFake.dao.AntiFakeLBSDao;
import com.module.antiFake.vo.AntiFakeLBS;


/**
 * 定位管理
 * 
 * @author wult
 * @Date Mar 7, 2012
 */
public class AntiFakeLBSManager  extends GenericHibernateManager<AntiFakeLBS, String>{
	private AntiFakeLBSDao dao = AntiFakeLBSDao.getInstance();
	private static AntiFakeLBSManager service;
	@Override
	public GenericHibernateDao<AntiFakeLBS, String> getDao() {
		return dao;
	}
	
	public synchronized static AntiFakeLBSManager getInstance() {
		if(service == null){
			service = new AntiFakeLBSManager();
		}
		return service;
	}

	/**
	 * 省市树状
	 * @return
	 * @throws Exception
	 */
	public List<AntiFakeLBS> getLBSTree()throws Exception{
		Session session = this.getSession();
		try {
			return dao.getLBSTree(session);
		} catch (Exception e) {
			throw e;
		} finally {
			this.closeSession();
		}
	}
	
}
